/*******************************************************************************************
 *  Vertical.c
 *
 *  Creating and managing Fire object strucutres.
 *
 *******************************************************************************************/







/*******************************************************************************************
 *  INCLUDES :
 *******************************************************************************************/

/* System and library related : */
#include <stdlib.h>
#include <string.h>

/* Project related : */
#include "Vertical.h"







/*******************************************************************************************
 *  FUNCTIONS :
 *******************************************************************************************/

/*******************************************************************************************
 *  NEWVERTICAL : Creates an empty Vertical object structure.
 *******************************************************************************************/
Vertical *newVertical(void) {
	Vertical *v;

	/* Creating the container structure : */
	v = (Vertical *)malloc(sizeof(Vertical));


	/* Setting the object's type : */
	v->otype = vertical;


	/* Returning the still empty structure : */
	return v;

}




/*******************************************************************************************
 *  FREEVERTICAL : destroys a Vertical object structure and all the objects it stores.
 *******************************************************************************************/
void freeVertical(Vertical *v) {

	free(v->value);			/* Free the value string.  */
	free(v);				/* Free the object itself. */

}




/*******************************************************************************************
 *  SETVERTICALTYPE : sets the Vertical object's type of acceleration.
 *******************************************************************************************/
void setVerticalType(Vertical *v, VrtType t) {
	v->type = t;
}



/*******************************************************************************************
 *  SETVERTICALVALUE : sets the Vertical object's acceleration value.
 *******************************************************************************************/
void setVerticalValue(Vertical *v, char *value) {
	v->value = value;
}
